const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    module: {
      rules: [
        // ts loader
        {
          test: /\.ts$/,
          use: [
            {
              loader: "babel-loader",
              options: {
                presets: ["@babel/preset-env"]
              }
            },
            "ts-loader"
          ],
          exclude: /node_modules/
        },
        // 资源加载的配置,用于加载bpmn文件
        {
          test: /\.bpmn/,
          type: 'asset/source'
        }
      ]
    },
    resolve: {
      extensions: [".ts", ".js"]
    }
  },
  // 指定前端服务端口
  devServer: {
    port: 8888
  }
})

